import org.omg.CORBA.DoubleHolder;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/4/13 8:39
 * @description:
 */
public class Triangle extends Shape {
  double a;
  double h;
public Triangle(double a,double h){
  this.a=a;
this.h=h;}
  @Override
  public double area() {
    return a*h;
  }

  @Override
  public String getName() {
    return "三角形";
  }


  @Override
  public void output() {
    System.out.println(getName()+"的面积是"+area());
  }
}
